package com.undsf.kanmu.kcsapi.controllers

import com.undsf.kanmu.kcsapi.messages.BaseMessage
import com.undsf.kanmu.kcsapi.messages.member.Incentive
import com.undsf.kanmu.kcsapi.messages.member.RequireInfo
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

/**
 * Created by Arathi on 2017/8/24.
 */
@RestController
class MemberController {
    var memberSvc: Any? = null // MemberService

    @RequestMapping("api_req_member/get_incentive")
    fun getIncentive(): BaseMessage<Incentive> {
        var data: Incentive = Incentive(0, listOf())
        var message: BaseMessage<Incentive> = BaseMessage<Incentive>(1, "成功")
        message.data = data
        return message
    }

    @RequestMapping("api_get_member/require_info")
    fun requireInfo(): BaseMessage<RequireInfo> {
        val memberId = 1
        val equips: List<RequireInfo.EquipInfo> = listOf()
        val unsetSlot: Map<String, List<Int>> = mutableMapOf()
        val dockyard: List<RequireInfo.Dockyard> = listOf()
        val items: List<RequireInfo.ItemInfo> = listOf()
        val furnitures: List<RequireInfo.FurnitureInfo> = listOf()

        var data: RequireInfo = RequireInfo(
                RequireInfo.Basic(memberId, 1),
                equips,
                unsetSlot,
                dockyard,
                items,
                furnitures
        )

        var message: BaseMessage<RequireInfo> = BaseMessage<RequireInfo>(0, "成功");
        message.data = data;
        return message;
    }
}